<template>
	<view>
		<view class="step">
			<view class="step-head">
				<u-steps :direction="direction" :current="current" :list="steps" :mode="mode" :icon="icon"></u-steps>	
			</view>
			<view class="step-foot">
				<u-button >取消</u-button><u-button type="primary">同意</u-button>
			</view>
		</view>
		<view class="order-info" @click="gotoOkami()">
			<view class="goods-section">
				<view class="g-header b-b">
					<text class="name">对方信息</text>
				</view>
				<!-- 商品列表 -->
				<view class="g-item">
					<image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=756705744,3505936868&fm=11&gp=0.jpg"></image>
					<view class="right">
						<text class="title clamp">{{user.name}}</text>
						<view class="price-box">
							<text class="price">￥17.8</text>
							<text class="number">x 1</text>
						</view>
						<text class="spec">235 币</text>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 金额明细 -->
		<view class="yt-list">
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">备注</text>
				<text class="cell-tip">无</text>
			</view>
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">约玩编号</text>
				<text class="cell-tip">5646614</text>
			</view>
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">申请时间</text>
				<text class="cell-tip">2020-5-4 12:45</text>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"order",
		props: {
			
		},
		data() {
			return {
				orderId:9,
				step:1,
				steps: [{
					name: '待接受'
				}, {
					name: '一起玩'
				}, {
					name: '已结算'
				}],
				current: 0,
				icon: 'checkmark',
				mode: 'number',
				direction: 'row',
				user:{
					id:"654214",
					avatar:"http://img3.imgtn.bdimg.com/it/u=1150341365,1327279810&fm=26&gp=0.jpg",
					name:"名字可以有8个字",  // 名字
					sexAge:"♀23",  // 性别年龄
					type:"error",
					views:"254",  // 浏览量
					orderVolume:"21",  // 订单量
					score:"4.7",
					birthday:"2003-5-1",
					constellation:"水瓶座",
					region:"湖南 娄底 娄星区",
					signature:"签名二十个字签名二十签名二十个签名二十个"
				},
			}
		},
		methods: {
			gotoOkami(){
				uni.navigateTo({
					url:'../../pages/okami_details/okami_details?id='+this.orderId
				});
			},
			loadData: function(id){
				console.debug('加载订单信息'+id);
				this.orderId = id;
			},
			getListByStep(step){
				if(step == 1){
					return [{
					name: '待接受'
				}, {
					name: '待安排'
				}, {
					name: '待结算'
				}];
				}else if(step == 2){
					return [{
					name: '已接受'
				}, {
					name: '一起玩'
				}, {
					name: '待结算'
				}];
				}else if(step == 3){
					return [{
					name: '待接受'
				}, {
					name: '一起玩'
				}, {
					name: '已结算'
				}];
				}
			}
		}
		
	}
</script>


<style  lang="scss">
page{
	background-color: #F2F2F2;
}
.order-info{
	
}
.step{
	background-color: #FFFFFF;
}
.step-head{
	padding: 40rpx 30rpx;
}
.step-foot{
	padding: 10rpx 30rpx 30rpx 40rpx;
	width: 100%;
	display: flex; 
	align-items: center; 
	justify-content: space-around;
}
.yt-list {
		margin-top: 16upx;
		background: #fff;
	}

	.yt-list-cell {
		display: flex;
		align-items: center;
		padding: 10upx 30upx 10upx 40upx;
		line-height: 70upx;
		position: relative;

		&.cell-hover {
			background: #fafafa;
		}

		&.b-b:after {
			left: 30upx;
		}

		.cell-icon {
			height: 32upx;
			width: 32upx;
			font-size: 22upx;
			color: #fff;
			text-align: center;
			line-height: 32upx;
			background: #f85e52;
			border-radius: 4upx;
			margin-right: 12upx;

			&.hb {
				background: #ffaa0e;
			}

			&.lpk {
				background: #3ab54a;
			}

		}

		.cell-more {
			align-self: center;
			font-size: 24upx;
			color: $font-color-light;
			margin-left: 8upx;
			margin-right: -10upx;
		}

		.cell-tit {
			flex: 1;
			font-size: 26upx;
			color: $font-color-light;
			margin-right: 10upx;
		}

		.cell-tip {
			font-size: 26upx;
			color: $font-color-dark;

			&.disabled {
				color: $font-color-light;
			}

			&.active {
				color: $base-color;
			}
			&.red{
				color: $base-color;
			}
		}

		&.desc-cell {
			.cell-tit {
				max-width: 90upx;
			}
		}

		.desc {
			flex: 1;
			font-size: $font-base;
			color: $font-color-dark;
		}
	}
.goods-section {
		margin-top: 16upx;
		background: #fff;
		padding-bottom: 1px;

		.g-header {
			display: flex;
			align-items: center;
			height: 84upx;
			padding: 0 20upx;
			position: relative;
		}

		.logo {
			display: block;
			width: 50upx;
			height: 50upx;
			border-radius: 100px;
		}

		.name {
			font-size: 30upx;
			color: $font-color-base;
			margin-left: 24upx;
		}

		.g-item {
			display: flex;
			margin: 20upx 30upx;

			image {
				flex-shrink: 0;
				display: block;
				width: 140upx;
				height: 140upx;
				border-radius: 4upx;
			}

			.right {
				flex: 1;
				padding-left: 24upx;
				overflow: hidden;
			}

			.title {
				font-size: 30upx;
				color: $font-color-dark;
			}

			.spec {
				font-size: 26upx;
				color: $font-color-light;
			}

			.price-box {
				display: flex;
				align-items: center;
				font-size: 32upx;
				color: $font-color-dark;
				padding-top: 10upx;

				.price {
					margin-bottom: 4upx;
				}
				.number{
					font-size: 26upx;
					color: $font-color-base;
					margin-left: 20upx;
				}
			}

			.step-box {
				position: relative;
			}
		}
	}
	
</style>
